.class Lrexsee/natives/widget/CustomizedGallery$1;
.super Lrexsee/natives/widget/CustomizedGallery$OnTransformListener;
.source "CustomizedGallery.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lrexsee/natives/widget/CustomizedGallery;->setDefaultTransformListener()V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field private final mCamera:Landroid/graphics/Camera;

.field final synthetic this$0:Lrexsee/natives/widget/CustomizedGallery;


# direct methods
.method constructor <init>(Lrexsee/natives/widget/CustomizedGallery;)V
    .locals 1

    .prologue
    .line 1
    iput-object p1, p0, Lrexsee/natives/widget/CustomizedGallery$1;->this$0:Lrexsee/natives/widget/CustomizedGallery;

    .line 38
    invoke-direct {p0}, Lrexsee/natives/widget/CustomizedGallery$OnTransformListener;-><init>()V

    .line 39
    new-instance v0, Landroid/graphics/Camera;

    invoke-direct {v0}, Landroid/graphics/Camera;-><init>()V

    iput-object v0, p0, Lrexsee/natives/widget/CustomizedGallery$1;->mCamera:Landroid/graphics/Camera;

    return-void
.end method


# virtual methods
.method public run(Landroid/view/View;Landroid/view/animation/Transformation;F)Z
    .locals 21
    .param p1, "child"    # Landroid/view/View;
    .param p2, "t"    # Landroid/view/animation/Transformation;
    .param p3, "position"    # F

    .prologue
    .line 42
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/natives/widget/CustomizedGallery$1;->this$0:Lrexsee/natives/widget/CustomizedGallery;

    move-object/from16 v18, v0

    invoke-virtual/range {v18 .. v18}, Lrexsee/natives/widget/CustomizedGallery;->getTag()Ljava/lang/Object;

    move-result-object v15

    check-cast v15, Lrexsee/natives/ViewTag;

    .line 43
    .local v15, "tag":Lrexsee/natives/ViewTag;
    if-nez v15, :cond_0

    const/16 v18, 0x0

    .line 80
    :goto_0
    return v18

    .line 44
    :cond_0
    const/high16 v18, 0x3f800000    # 1.0f

    cmpl-float v18, p3, v18

    if-lez v18, :cond_1

    const/high16 v18, 0x3f800000    # 1.0f

    move/from16 p3, v18

    .line 45
    :cond_1
    const/high16 v18, -0x40800000    # -1.0f

    cmpg-float v18, p3, v18

    if-gez v18, :cond_2

    const/high16 v18, -0x40800000    # -1.0f

    move/from16 p3, v18

    .line 46
    :cond_2
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/natives/widget/CustomizedGallery$1;->mCamera:Landroid/graphics/Camera;

    move-object/from16 v18, v0

    invoke-virtual/range {v18 .. v18}, Landroid/graphics/Camera;->save()V

    .line 47
    invoke-virtual/range {p2 .. p2}, Landroid/view/animation/Transformation;->getMatrix()Landroid/graphics/Matrix;

    move-result-object v5

    .line 48
    .local v5, "imageMatrix":Landroid/graphics/Matrix;
    move-object v0, v15

    iget-object v0, v0, Lrexsee/natives/ViewTag;->style:Lrexsee/core/style/StyleSheet;

    move-object/from16 v18, v0

    move-object/from16 v0, v18

    iget-object v0, v0, Lrexsee/core/style/StyleSheet;->zoom_reverse:Ljava/lang/String;

    move-object/from16 v18, v0

    const-string v19, "false"

    invoke-virtual/range {v18 .. v19}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v18

    if-eqz v18, :cond_7

    const/16 v18, 0x0

    move/from16 v17, v18

    .line 49
    .local v17, "translateZReverse":Z
    :goto_1
    if-eqz v17, :cond_8

    const/high16 v18, 0x3f800000    # 1.0f

    invoke-static/range {p3 .. p3}, Ljava/lang/Math;->abs(F)F

    move-result v19

    sub-float v18, v18, v19

    move-object v0, v15

    iget-object v0, v0, Lrexsee/natives/ViewTag;->style:Lrexsee/core/style/StyleSheet;

    move-object/from16 v19, v0

    move-object/from16 v0, v19

    iget-object v0, v0, Lrexsee/core/style/StyleSheet;->zoom:Ljava/lang/String;

    move-object/from16 v19, v0

    const/16 v20, 0x0

    invoke-static/range {v19 .. v20}, Lrexsee/core/utilities/Utilities;->getInt(Ljava/lang/String;I)I

    move-result v19

    move/from16 v0, v19

    int-to-float v0, v0

    move/from16 v19, v0

    mul-float v18, v18, v19

    move/from16 v16, v18

    .line 50
    .local v16, "translateZ":F
    :goto_2
    const/16 v18, 0x0

    cmpl-float v18, v16, v18

    if-eqz v18, :cond_3

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/natives/widget/CustomizedGallery$1;->mCamera:Landroid/graphics/Camera;

    move-object/from16 v18, v0

    const/16 v19, 0x0

    const/16 v20, 0x0

    move-object/from16 v0, v18

    move/from16 v1, v19

    move/from16 v2, v20

    move/from16 v3, v16

    invoke-virtual {v0, v1, v2, v3}, Landroid/graphics/Camera;->translate(FFF)V

    .line 51
    :cond_3
    move-object v0, v15

    iget-object v0, v0, Lrexsee/natives/ViewTag;->style:Lrexsee/core/style/StyleSheet;

    move-object/from16 v18, v0

    move-object/from16 v0, v18

    iget-object v0, v0, Lrexsee/core/style/StyleSheet;->rotation:Ljava/lang/String;

    move-object/from16 v18, v0

    const-string v19, "\\ "

    invoke-virtual/range {v18 .. v19}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v7

    .line 53
    .local v7, "rotation":[Ljava/lang/String;
    move-object v0, v15

    iget-object v0, v0, Lrexsee/natives/ViewTag;->style:Lrexsee/core/style/StyleSheet;

    move-object/from16 v18, v0

    move-object/from16 v0, v18

    iget-object v0, v0, Lrexsee/core/style/StyleSheet;->rotation_reverse:Ljava/lang/String;

    move-object/from16 v18, v0

    const-string v19, "\\ "

    invoke-virtual/range {v18 .. v19}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v8

    .line 55
    .local v8, "rotationReverse":[Ljava/lang/String;
    move-object v0, v8

    array-length v0, v0

    move/from16 v18, v0

    const/16 v19, 0x3

    move/from16 v0, v18

    move/from16 v1, v19

    if-ne v0, v1, :cond_9

    .line 56
    const/16 v18, 0x0

    aget-object v18, v8, v18

    const-string v19, "true"

    invoke-virtual/range {v18 .. v19}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v10

    .line 57
    .local v10, "rotationXReverse":Z
    const/16 v18, 0x1

    aget-object v18, v8, v18

    const-string v19, "true"

    invoke-virtual/range {v18 .. v19}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v12

    .line 58
    .local v12, "rotationYReverse":Z
    const/16 v18, 0x2

    aget-object v18, v8, v18

    const-string v19, "true"

    invoke-virtual/range {v18 .. v19}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v14

    .line 62
    .local v14, "rotationZReverse":Z
    :goto_3
    move-object v0, v7

    array-length v0, v0

    move/from16 v18, v0

    const/16 v19, 0x3

    move/from16 v0, v18

    move/from16 v1, v19

    if-ne v0, v1, :cond_d

    .line 63
    if-eqz v10, :cond_a

    invoke-static/range {p3 .. p3}, Ljava/lang/Math;->abs(F)F

    move-result v18

    const/16 v19, 0x0

    aget-object v19, v7, v19

    const/16 v20, 0x0

    invoke-static/range {v19 .. v20}, Lrexsee/core/utilities/Utilities;->getInt(Ljava/lang/String;I)I

    move-result v19

    move/from16 v0, v19

    int-to-float v0, v0

    move/from16 v19, v0

    mul-float v18, v18, v19

    move/from16 v0, v18

    float-to-int v0, v0

    move/from16 v18, v0

    move/from16 v9, v18

    .line 64
    .local v9, "rotationX":I
    :goto_4
    if-eqz v12, :cond_b

    invoke-static/range {p3 .. p3}, Ljava/lang/Math;->abs(F)F

    move-result v18

    const/16 v19, 0x1

    aget-object v19, v7, v19

    const/16 v20, 0x3c

    invoke-static/range {v19 .. v20}, Lrexsee/core/utilities/Utilities;->getInt(Ljava/lang/String;I)I

    move-result v19

    move/from16 v0, v19

    int-to-float v0, v0

    move/from16 v19, v0

    mul-float v18, v18, v19

    move/from16 v0, v18

    float-to-int v0, v0

    move/from16 v18, v0

    move/from16 v11, v18

    .line 65
    .local v11, "rotationY":I
    :goto_5
    if-eqz v14, :cond_c

    invoke-static/range {p3 .. p3}, Ljava/lang/Math;->abs(F)F

    move-result v18

    const/16 v19, 0x2

    aget-object v19, v7, v19

    const/16 v20, 0x0

    invoke-static/range {v19 .. v20}, Lrexsee/core/utilities/Utilities;->getInt(Ljava/lang/String;I)I

    move-result v19

    move/from16 v0, v19

    int-to-float v0, v0

    move/from16 v19, v0

    mul-float v18, v18, v19

    move/from16 v0, v18

    float-to-int v0, v0

    move/from16 v18, v0

    move/from16 v13, v18

    .line 71
    .local v13, "rotationZ":I
    :goto_6
    if-eqz v9, :cond_4

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/natives/widget/CustomizedGallery$1;->mCamera:Landroid/graphics/Camera;

    move-object/from16 v18, v0

    move v0, v9

    int-to-float v0, v0

    move/from16 v19, v0

    invoke-virtual/range {v18 .. v19}, Landroid/graphics/Camera;->rotateX(F)V

    .line 72
    :cond_4
    if-eqz v11, :cond_5

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/natives/widget/CustomizedGallery$1;->mCamera:Landroid/graphics/Camera;

    move-object/from16 v18, v0

    move v0, v11

    int-to-float v0, v0

    move/from16 v19, v0

    invoke-virtual/range {v18 .. v19}, Landroid/graphics/Camera;->rotateY(F)V

    .line 73
    :cond_5
    if-eqz v13, :cond_6

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/natives/widget/CustomizedGallery$1;->mCamera:Landroid/graphics/Camera;

    move-object/from16 v18, v0

    move v0, v13

    int-to-float v0, v0

    move/from16 v19, v0

    invoke-virtual/range {v18 .. v19}, Landroid/graphics/Camera;->rotateZ(F)V

    .line 74
    :cond_6
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/natives/widget/CustomizedGallery$1;->mCamera:Landroid/graphics/Camera;

    move-object/from16 v18, v0

    move-object/from16 v0, v18

    move-object v1, v5

    invoke-virtual {v0, v1}, Landroid/graphics/Camera;->getMatrix(Landroid/graphics/Matrix;)V

    .line 75
    invoke-virtual/range {p1 .. p1}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v18

    move-object/from16 v0, v18

    iget v0, v0, Landroid/view/ViewGroup$LayoutParams;->height:I

    move v4, v0

    .line 76
    .local v4, "imageHeight":I
    invoke-virtual/range {p1 .. p1}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v18

    move-object/from16 v0, v18

    iget v0, v0, Landroid/view/ViewGroup$LayoutParams;->width:I

    move v6, v0

    .line 77
    .local v6, "imageWidth":I
    div-int/lit8 v18, v6, 0x2

    move/from16 v0, v18

    neg-int v0, v0

    move/from16 v18, v0

    move/from16 v0, v18

    int-to-float v0, v0

    move/from16 v18, v0

    div-int/lit8 v19, v4, 0x2

    move/from16 v0, v19

    neg-int v0, v0

    move/from16 v19, v0

    move/from16 v0, v19

    int-to-float v0, v0

    move/from16 v19, v0

    move-object v0, v5

    move/from16 v1, v18

    move/from16 v2, v19

    invoke-virtual {v0, v1, v2}, Landroid/graphics/Matrix;->preTranslate(FF)Z

    .line 78
    div-int/lit8 v18, v6, 0x2

    move/from16 v0, v18

    int-to-float v0, v0

    move/from16 v18, v0

    div-int/lit8 v19, v4, 0x2

    move/from16 v0, v19

    int-to-float v0, v0

    move/from16 v19, v0

    move-object v0, v5

    move/from16 v1, v18

    move/from16 v2, v19

    invoke-virtual {v0, v1, v2}, Landroid/graphics/Matrix;->postTranslate(FF)Z

    .line 79
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/natives/widget/CustomizedGallery$1;->mCamera:Landroid/graphics/Camera;

    move-object/from16 v18, v0

    invoke-virtual/range {v18 .. v18}, Landroid/graphics/Camera;->restore()V

    .line 80
    const/16 v18, 0x1

    goto/16 :goto_0

    .line 48
    .end local v4    # "imageHeight":I
    .end local v6    # "imageWidth":I
    .end local v7    # "rotation":[Ljava/lang/String;
    .end local v8    # "rotationReverse":[Ljava/lang/String;
    .end local v9    # "rotationX":I
    .end local v10    # "rotationXReverse":Z
    .end local v11    # "rotationY":I
    .end local v12    # "rotationYReverse":Z
    .end local v13    # "rotationZ":I
    .end local v14    # "rotationZReverse":Z
    .end local v16    # "translateZ":F
    .end local v17    # "translateZReverse":Z
    :cond_7
    const/16 v18, 0x1

    move/from16 v17, v18

    goto/16 :goto_1

    .line 49
    .restart local v17    # "translateZReverse":Z
    :cond_8
    const/high16 v18, 0x3f800000    # 1.0f

    sub-float v18, v18, p3

    move-object v0, v15

    iget-object v0, v0, Lrexsee/natives/ViewTag;->style:Lrexsee/core/style/StyleSheet;

    move-object/from16 v19, v0

    move-object/from16 v0, v19

    iget-object v0, v0, Lrexsee/core/style/StyleSheet;->zoom:Ljava/lang/String;

    move-object/from16 v19, v0

    const/16 v20, 0x0

    invoke-static/range {v19 .. v20}, Lrexsee/core/utilities/Utilities;->getInt(Ljava/lang/String;I)I

    move-result v19

    move/from16 v0, v19

    int-to-float v0, v0

    move/from16 v19, v0

    mul-float v18, v18, v19

    move/from16 v16, v18

    goto/16 :goto_2

    .line 60
    .restart local v7    # "rotation":[Ljava/lang/String;
    .restart local v8    # "rotationReverse":[Ljava/lang/String;
    .restart local v16    # "translateZ":F
    :cond_9
    const/16 v18, 0x0

    aget-object v18, v8, v18

    const-string v19, "true"

    invoke-virtual/range {v18 .. v19}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v14

    .restart local v14    # "rotationZReverse":Z
    move v12, v14

    .restart local v12    # "rotationYReverse":Z
    move v10, v14

    .restart local v10    # "rotationXReverse":Z
    goto/16 :goto_3

    .line 63
    :cond_a
    const/16 v18, 0x0

    aget-object v18, v7, v18

    const/16 v19, 0x0

    invoke-static/range {v18 .. v19}, Lrexsee/core/utilities/Utilities;->getInt(Ljava/lang/String;I)I

    move-result v18

    move/from16 v0, v18

    int-to-float v0, v0

    move/from16 v18, v0

    mul-float v18, v18, p3

    move/from16 v0, v18

    float-to-int v0, v0

    move/from16 v18, v0

    move/from16 v9, v18

    goto/16 :goto_4

    .line 64
    .restart local v9    # "rotationX":I
    :cond_b
    const/16 v18, 0x1

    aget-object v18, v7, v18

    const/16 v19, 0x3c

    invoke-static/range {v18 .. v19}, Lrexsee/core/utilities/Utilities;->getInt(Ljava/lang/String;I)I

    move-result v18

    move/from16 v0, v18

    int-to-float v0, v0

    move/from16 v18, v0

    mul-float v18, v18, p3

    move/from16 v0, v18

    float-to-int v0, v0

    move/from16 v18, v0

    move/from16 v11, v18

    goto/16 :goto_5

    .line 65
    .restart local v11    # "rotationY":I
    :cond_c
    const/16 v18, 0x2

    aget-object v18, v7, v18

    const/16 v19, 0x0

    invoke-static/range {v18 .. v19}, Lrexsee/core/utilities/Utilities;->getInt(Ljava/lang/String;I)I

    move-result v18

    move/from16 v0, v18

    int-to-float v0, v0

    move/from16 v18, v0

    mul-float v18, v18, p3

    move/from16 v0, v18

    float-to-int v0, v0

    move/from16 v18, v0

    move/from16 v13, v18

    goto/16 :goto_6

    .line 67
    .end local v9    # "rotationX":I
    .end local v11    # "rotationY":I
    :cond_d
    const/4 v9, 0x0

    .line 68
    .restart local v9    # "rotationX":I
    if-eqz v12, :cond_e

    invoke-static/range {p3 .. p3}, Ljava/lang/Math;->abs(F)F

    move-result v18

    const/16 v19, 0x0

    aget-object v19, v7, v19

    const/16 v20, 0x3c

    invoke-static/range {v19 .. v20}, Lrexsee/core/utilities/Utilities;->getInt(Ljava/lang/String;I)I

    move-result v19

    move/from16 v0, v19

    int-to-float v0, v0

    move/from16 v19, v0

    mul-float v18, v18, v19

    move/from16 v0, v18

    float-to-int v0, v0

    move/from16 v18, v0

    move/from16 v11, v18

    .line 69
    .restart local v11    # "rotationY":I
    :goto_7
    const/4 v13, 0x0

    .restart local v13    # "rotationZ":I
    goto/16 :goto_6

    .line 68
    .end local v11    # "rotationY":I
    .end local v13    # "rotationZ":I
    :cond_e
    const/16 v18, 0x0

    aget-object v18, v7, v18

    const/16 v19, 0x3c

    invoke-static/range {v18 .. v19}, Lrexsee/core/utilities/Utilities;->getInt(Ljava/lang/String;I)I

    move-result v18

    move/from16 v0, v18

    int-to-float v0, v0

    move/from16 v18, v0

    mul-float v18, v18, p3

    move/from16 v0, v18

    float-to-int v0, v0

    move/from16 v18, v0

    move/from16 v11, v18

    goto :goto_7
.end method
